<h2 class="search-title popSearchTitle">Report Item</h2>
<div class="ques-popup">
    <form action="" method="post" id="message">
    <input type="hidden" value="<?php echo $qData['Product']['id'];?>" name="data[Reporteditem][product_id]" />
    
<fieldset>
 <label>Item :</label>
 <p><?php echo $qData['Product']['products_title'];?></p>
 </fieldset>
 <fieldset>
 <input type="hidden" value="<?php echo $session->read('Auth.User.id');?>" name="data[Reporteditem][user_id]" />
 
</fieldset>
<fieldset>
 <label>Subject :</label>
 <select name="data[Reporteditem][subject]">
   <option value="Counterfeit">Counterfeit</option>
   <option value="Policy Violation">Policy Violation</option>
   <option value="Other">Other</option>
 </select>
</fieldset>

<fieldset style="padding:10px 0; border-top:1px solid; border-bottom:1px solid; margin:10px 0;">

<textarea name="data[Reporteditem][description]" title="Enter additional information here" value="Enter additional information here"
    onfocus="if(this.value=='Enter additional information here'){this.value=''}"
    onblur="if(this.value==''){this.value='Enter additional information here'}">Enter additional information here</textarea>

</fieldset>
<fieldset class="btn">
  <input type="button" value="Cancel" name="" class="popupClose" />
  <input type="submit" value="Send" name="sendMessege" />
</fieldset>
</form>
</div>
<script type="text/javascript">
    jQuery(document).ready(function(){
        var content='<p>Your Report was successfully sent to Admin</p><br /><input type="button" value="Close" onclick=disablePopup(); />';
	jQuery('input:submit[name="sendMessege"]').click(function(){
	var dataString=jQuery('#message').serialize();
	jQuery.ajax({
			type: "POST",
			url: baseurl+"products/report_problem",
			data: dataString,
			success: function(data) {
                            jQuery('.ques-popup').fadeOut();
                            jQuery('.ques-popup').remove();
                            jQuery(content).insertAfter('.popSearchTitle');
			}
		});
		return false;
	});
});

jQuery('.popupClose').click(function(){
    disablePopup();
})
</script>